package com.erps.config;

import com.erps.CommonUtils.AppConfig;
import com.jfinal.core.Controller;

/**
 * DefaultController
 */
public class IndexController extends Controller {
	public void index() {
		this.redirect("/home");
	}

	public void top() {
		render("top.ftl");
	}

	public void about() {
		render("head.ftl");
	}

	public void feedback() {
		render("feedback.jsp");
	}

	public void keyword() {
		render("keyword.jsp");
	}

	public void logoff() {
		System.out.println("用户注销.....");
		removeSessionAttr(AppConfig.SESSION_ORGID);
		removeSessionAttr(AppConfig.SESSION_ORGNAME);
		removeSessionAttr(AppConfig.SESSION_USERID);
		removeSessionAttr(AppConfig.SESSION_USERNAME);
		getSession().invalidate();
		redirect("/home");
	}

	public void switchframe() {
		render("switchframe.html");
	}

	public void defview() {
		render("switchframe.html");
	}
}
